﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JqueryNet.FormControl.FormHtmlControl
{
    public class JHtmlLink : JHtmlControl
    {
        private System.Web.UI.HtmlControls.HtmlLink htmlLink;

        public JHtmlLink(System.Web.UI.HtmlControls.HtmlLink htmlLink):base(htmlLink)
        {
            this.htmlLink = htmlLink;
        }

        public override void Attr(string key)
        {
            if (key.ToLower() == "href")
            {
                Value = htmlLink.Href;
            }
            else
                base.Attr(key);
        }

        public override void Attr(string key, string value)
        {
            if (key.ToLower() == "href")
            {
                htmlLink.Href = value;
            }
            else
                base.Attr(key, value);
        }
    }
}
